package pers.wwz.study.file.utils;

import org.apache.commons.imaging.ImageInfo;
import org.apache.commons.imaging.Imaging;

import java.io.File;

public class GetDpiByImageReader {
    public static void main(String... args) throws Exception {

            ImageInfo imageInfo = Imaging.getImageInfo(new File("D:\\tmp\\test\\20231027-101836_DPI150.jpg"));
            System.out.println("dpi为"+imageInfo.getPhysicalWidthDpi());



    }
}